/*
 * =====================================================================================
 *
 *       Filename:  glassbutton.h
 *
 *    Description:  Glass Button的发源地
 *
 *        Version:  1.0
 *        Created:  12/02/11 18:33:17
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  H_Ley (), kalxd@126.com
 *        Company:  
 *
 * =====================================================================================
 */

#ifndef GLASSBUTTON_H
#define GLASSBUTTON_H 

#include "glassglobal.h"

class GlassButton:public QPushButton{ Q_OBJECT
	public:
		GlassButton(QWidget *parent=0);
		~GlassButton();
	protected:
		void enterEvent(QEvent *event);
		void leaveEvent(QEvent *event);
		void mousePressEvent(QMouseEvent *event);
		void mouseReleaseEvent(QMouseEvent *event);
		void resizeEvent(QResizeEvent *event);
		void paintEvent(QPaintEvent *event);

		void InitButton();
	private:
		QPixmap *normal_pix;
		QPixmap *hover_pix;
		QPixmap *focus_pix;

		bool is_press;
};

#endif
